import fetch from './util/fetch';

/*我的资产*/
export function getAssets() {
  return fetch({
    url: 'merchant/account/property',
    method: 'get',
  });
}

/*提现提交*/
export function withdrawCash(data) {
  return fetch({
    url: 'merchant/account/withdrawCash',
    method: 'post',
    data:data,
  });
}

/*提现记录*/
export function getCashRecords(data) {
  return fetch({
    url: 'merchant/cash',
    method: 'get',
    params: data,
  });
}

/*取消提现*/
export function cancelWithdraw(data) {
  return fetch({
    url: 'merchant/account/withdrawCasheRecall/' + data.id,
    method: 'post',
    params: data,
    data:data,
  });
}

/*租金管理*/
export function getRentRecords(data) {
  return fetch({
    url: 'payment/rentManager',
    method: 'post',
    data: data,
  });
}

/*赔偿金管理*/
export function getCompensateRecords(data) {
  return fetch({
    url: 'order/compensate',
    method: 'get',
    params: data,
  });
}

/*押金管理*/
export function getDepositRecords(data) {
  return fetch({
    url: 'order/refund/cash/pledge',
    method: 'get',
    params: data,
  });
}


/*交易流水*/
export function getTradingRecords(data) {
  return fetch({
    url: 'merchant/account/detail',
    method: 'post',
    data: data,
  });
}

/*交易流水类型*/
export function getTradingType(data) {
  return fetch({
    url: 'merchant/account/detail/transactionType',
    method: 'get',
    params: data,
  });
}
